import { defineComponent as C, useSlots as f, computed as i, openBlock as l, createElementBlock as d, unref as s, renderSlot as y, normalizeStyle as c, toDisplayString as v, createElementVNode as w, createCommentVNode as m, createBlock as a, resolveDynamicComponent as u } from "vue";
const p = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), I = { class: "trend" }, k = { class: "icon" }, _ = /* @__PURE__ */ C({
  __name: "index",
  props: {
    type: { default: "up" },
    text: { default: "文字" },
    upIconColor: { default: "#f5222d" },
    downIconColor: { default: "#52c41a" },
    reverseColor: { type: Boolean, default: !1 },
    upTextColor: { default: "#000" },
    downTextColor: { default: "#000" },
    upIcon: { default: "ArrowUp" },
    downIcon: { default: "ArrowDown" }
  },
  setup(e) {
    const r = e, t = f(), n = i(() => r.type === "up" ? r.upTextColor : r.downTextColor);
    return (o, T) => (l(), d("div", I, [
      s(t).default ? y(o.$slots, "default", { key: 0 }, void 0, !0) : (l(), d(
        "div",
        {
          key: 1,
          class: "text",
          style: c({ color: n.value })
        },
        v(o.text),
        5
        /* TEXT, STYLE */
      )),
      w("div", k, [
        m(` <el-icon-arrow-up\r
        :style="{ color: !reverseColor ? upIconColor : downIconColor }"\r
        v-if="type === 'up'"\r
      />\r
      <el-icon-arrow-down\r
        :style="{ color: !reverseColor ? downIconColor : upIconColor }"\r
        v-else\r
      /> `),
        o.type === "up" ? (l(), a(u(`el-icon${s(p)(o.upIcon)}`), {
          key: 0,
          style: c({ color: o.reverseColor ? o.downIconColor : o.upIconColor })
        }, null, 8, ["style"])) : (l(), a(u(`el-icon${s(p)(o.downIcon)}`), {
          key: 1,
          style: c({ color: o.reverseColor ? o.upIconColor : o.downIconColor })
        }, null, 8, ["style"]))
      ])
    ]));
  }
}), B = (e, r) => {
  const t = e.__vccOpts || e;
  for (const [n, o] of r)
    t[n] = o;
  return t;
}, S = /* @__PURE__ */ B(_, [["__scopeId", "data-v-d1ff8806"]]), g = {
  install(e) {
    e.component("m-trend", S);
  }
};
export {
  g as default
};
